const Joi = require("joi");
const schema = Joi.object({
  username: Joi.string().min(3).max(30),
  pagesizes: Joi.number().integer().min(10).max(100),
});

const { error, value } = schema.validate({ username: "zsss", pagesizes: 5 });
console.log(error);
console.log(value);
